<div class="layui-card">
    {block name='style'}{/block}
    {block name='header'}
    {notempty name='title'}
    <div class="layui-card-header">
        <span class="layui-icon font-s10 color-desc margin-right-5">&#xe65b;</span>{$title|lang}
        <div class="pull-right">{block name='button'}{/block}</div>
    </div>
    {/notempty}
    {/block}
    <div class="layui-card-line"></div>
    <div class="layui-card-body">
        <div class="layui-card-table">
            {notempty name='showErrorMessage'}
            <div class="think-box-notify" type="error">
                <b>{:lang('系统提示：')}</b><span>{$showErrorMessage|raw}</span>
            </div>
            {/notempty}
            {block name='content'}{/block}
        </div>
    </div>
    {block name='script'}{/block}
    <script>
        form.on('select(platform)', function(data){

            $.ajax({
                type : 'get',
                url  : "{:sysuri('common/ajax/getTeacherList')}",
                data : {platform_id:data.value},
                success:function (res) {
                    if (res.code == 1) {
                        var html = "<option value=''>{:lang('-- 请选择 --')}</option>";

                        let data = res.data;
                        for (var i in data) {

                            html += "<option value='"+i+"'>"+data[i]+"</option>";
                        }

                        $('.teacher').html(html);

                        layui.form.render('select'); // 仅渲染 select 元素
                    }
                }
            })
        });
    </script>
</div>